package 作业文件.构造方法作业;

public class TriAngle {
    public static void main(String[] args) {
        TriAngle triAngle = new TriAngle(10,10);
        triAngle.mianji();
    }
    private  int base;
    private  int height;


    public  TriAngle(int base,int height){
        this.base=base;
        this.height=height;
    }

 public  void  mianji(){
     System.out.println("三角形的是面积:"+(this.base*this.height/2));
 }



    public int getHeight() {
        return height;
    }

    public void setHeight(int height) {
        this.height = height;
    }

    public int getBase() {
        return base;
    }

    public void setBase(int base) {
        this.base = base;
    }




}
